package cn.bdqn.sptparent.web.controller;



import cn.bdqn.sptparent.domain.po.Address;
import cn.bdqn.sptparent.service.AddressService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lhl
 * @since 2023-05-17
 */
@RestController
@CrossOrigin
@RequestMapping("/address")
public class AddressController {
    @Resource
    private AddressService addressService;

    @GetMapping("")
    public List<Address> getAll(){
        return addressService.list();
    }

}
